<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <title>华迅直购</title>
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/entrance/home.css"/>
    <link rel="stylesheet" type="text/css" href="css/address/address.css"/>
    <script type="text/javascript" src="js/base/jquery-3.1.1.min.js?ver=2.0.4" charset="utf-8"></script>
    <script type="text/javascript" src="js/base/underscore-min.js"></script>
    <script src="js/base/api.js"></script>
    <script src="js/base/base.js"></script>
    <script src="js/base/vue.js"></script>
    <script src="js/base/vue-filter.js"></script>

    <script type="text/javascript" src="js/base/magiclamp.js?ver=2.0.4" charset="utf-8"></script>


    <script type="text/javascript" src="js/goods_friend_comment_list.js?t=32" charset="utf-8"></script>


    <!-- Core CSS file -->
    <link rel="stylesheet" href="photoswipe/photoswipe.css">

    <!-- Skin CSS file (styling of UI - buttons, caption, etc.)
         In the folder of skin CSS file there are also:
         - .png and .svg icons sprite,
         - preloader.gif (for browsers that do not support CSS animations) -->
    <link rel="stylesheet" href="photoswipe/default-skin/default-skin.css">

    <!-- Core JS file -->
    <script src="photoswipe/photoswipe.min.js"></script>

    <!-- UI JS file -->
    <script src="photoswipe/photoswipe-ui-default.min.js"></script>

    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
</head>
<body>
<div id="address_modefy">
    <div v-if="show_share_bar" style="position: fixed; z-index: 10000; top: 0px; bottom: 0px;left: 0px;right: 0px; background: rgba(0,0,0,.3)">
        <div style="display: flex; flex-direction: column;margin: auto; margin-top: 15rem; background: #ffffff;border-radius:1rem; width: 30rem; ">
            <div style="width: 90%;margin: auto;height: 5rem; padding: 1.5rem; border-bottom: #d9d7d7 1px solid;text-align: center;font-size: 1.5rem;">
                <b>一起买, 一起减</b> <img src="img2/hong_jian_tou.png" style="width: 2rem;float: right;">
            </div>
            <div style="width: 90%;margin:auto;padding: 2rem 0 0 0;">
                点击右上角菜单转发或者分享给你的朋友，
                参加"一起买， 一起减"活动。您的朋友可以立减<span style='color: red;font-weight: bold'>{{price_filter(goods_info.x_price)}}元</span>，
                每找到一个朋友一起买,您可以再减<span style='color: red;font-weight: bold'>{{price_filter(goods_info.y_price)}}元</span>，商品
                最低价格可以减到<span style='color: red;font-weight: bold'>{{price_filter(goods_info.m_price)}}元</span>.
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;color: #1E88C7;font-size: 1.2rem;" v-if="together_goods_info.visit_list">
                <img src="img2/yijingmai.png" style="width: 1.3rem;"> 愿意一起买，但还没有买单:
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;font-size: 1.2rem;" v-if="together_goods_info.visit_list">
                <span >{{together_goods_info.visit_list}}</span>
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;color: #1E88C7;font-size: 1.2rem;" v-if="together_goods_info.buy_list">
                <img src="img2/yijingmai.png" style="width: 1.3rem;"> 已经购买:
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;font-size: 1.2rem;" v-if="together_goods_info.buy_list">
                <span >{{together_goods_info.buy_list}}</span>
            </div>
            <div style="display: flex;flex-direction: column;border-top: #d9d7d7 1px solid;">

                <div style="padding: 1rem;margin:auto;font-size: 2rem;color: #063e78;" @click="show_share_bar=false;">
                    我知道了
                </div>
            </div>

        </div>
    </div>
    <header>
        <a @click="page_back" v-if="baseConfig.is_phone" class="h-left back-btn"><i
                class="iconfont icon-fanhui"></i></a>
        <h1 class="h-title" style="width: 75%;left: 10%;">{{goods.name}} </h1>
        <a @click="show_share_bar=true;" target="" data-href="" class="h-right">
            <img src="img2/fenxiang2.png" style="width: 4rem;height: 1.2rem;" class="img-icon">
        </a>
    </header>
    <div id="root">
        <div class="pay-gs-list g-wrap margin-bottom">
            <div  style="padding: 0 1rem 0 1rem;background-color: #ffffff;">
                <div v-if="goods.files_list.length==1" v-on:click.stop="open_goods_detail(goods)">
                    <img :src="img.url+'&imageView2/0/w/375/h/375'" v-for="img in goods.files_list" width="99%" style="margin: 0.1rem;"/>
                </div>
                <div v-if="goods.files_list.length==2" v-on:click.stop="open_goods_detail(goods)">
                    <img :src="img.url+'&imageView2/0/w/185/h/185'" v-for="img in goods.files_list" width="48%" style="margin: 0.1rem;"/>
                </div>
                <div v-if="goods.files_list.length==3" v-on:click.stop="open_goods_detail(goods)">
                    <img :src="img.url+'&imageView2/0/w/120/h/129'" v-for="img in goods.files_list" width="30%" style="margin: 0.1rem;"/>
                </div>
                <div v-if="goods.files_list.length==4" v-on:click.stop="open_goods_detail(goods)">
                    <img :src="img.url+'&imageView2/0/w/185/h/185'" v-for="img in goods.files_list" width="48%" style="margin: 0.1rem;"/>
                </div>
                <div style="width: 100%;display: flex;flex-direction: row;margin-top: 1rem;">

                    <span style="flex: 1 1 auto;font-size: 1.5rem;font-weight: bold;" v-on:click.stop="open_goods_detail(goods)">点击上方图片购买<img src="img2/click_hand.png" width="45px"/></span>

                </div>
                <div style="width: 100%;display: flex;flex-direction: row;margin-top: 1rem;">

                    <div style="flex: 1 1 auto;width: 50%; font-size: 1.8rem;font-weight: bold;color: #D0021B;text-decoration:line-through;" v-if="together_goods_info.has_huodong">
                        {{ price_filter( goods.price - goods.bu_tie_price)}}
                    </div>
                    <div style="flex: 1 1 auto;width: 50%; font-size: 1.8rem;font-weight: bold;color: #D0021B" v-if="!together_goods_info.has_huodong">
                        {{ price_filter( goods.price - goods.bu_tie_price)}}
                    </div>
                    <div style="font-size: 1.2rem;width: 30%;flex: 0 1 auto;padding-top: 0.2rem;">
<!--                        <div style="border: 1px solid #4E648F; border-radius: 0.5rem; width: 4rem;text-align: center;" v-on:click.stop="ping_lun(goods, null)">-->
<!--                            评论-->
<!--                        </div>-->
                        <img src="img2/pinlunanniu.png" style="width:5rem;" v-on:click.stop="ping_lun(goods, null)">
                    </div>
                </div>

                <div style="margin:auto; display: inline-block; padding-left: 3rem;padding-bottom: 2rem;">
                    <span style="color: #9B9B9B;font-size: 1.5rem;">综合评价:</span>
                    <img v-for="img in start_list" v-if="goods_info.pro_ping_jia==-1"
                         :src="img.index<=goods_info.ping_jia+0.5?'img2/star_big_light.png':'img2/star.png'"
                         style="width: 1.5rem;">
                    <img v-for="img in start_list" v-if="goods_info.pro_ping_jia>-1"
                         :src="img.index<=goods_info.pro_ping_jia+0.5?'img2/star_big_light.png':'img2/star.png'"
                         style="width: 1.5rem;">

                </div>
                <div class="g-huodong" v-if="goods_info.is_together">
                    <div class="pink" v-if="together_goods_info.has_huodong&&(goods_info.price-goods_info.bu_tie_price-together_goods_info.visit_price-together_goods_info.buy_price-together_goods_info.share_user_price)>goods_info.m_price" @click="show_share_bar=true;" >
                        现价{{price_filter(goods_info.price-goods_info.bu_tie_price-together_goods_info.visit_price-together_goods_info.buy_price-together_goods_info.share_user_price)}}元 · 一共减{{price_filter(together_goods_info.visit_price+together_goods_info.buy_price+together_goods_info.share_user_price)}}元。
                    </div>
                    <div class="pink" v-if="together_goods_info.has_huodong&&(goods_info.price-goods_info.bu_tie_price-together_goods_info.visit_price-together_goods_info.buy_price-together_goods_info.share_user_price)<goods_info.m_price" @click="show_share_bar=true;" >
                        现价{{price_filter(goods_info.m_price)}}元,已减到最低价。
                    </div>
                    <div class="msg" v-if="together_goods_info.share_user_name">
                        <span style='color: red;font-weight: bold'>{{together_goods_info.share_user_name}}</span>分享给您，立减<span style='color: red;font-weight: bold'>{{price_filter(together_goods_info.share_user_price)}}</span>元。
                    </div>
                    <div class="msg" v-if="together_goods_info.visit_num>0">
                        有<span style='color: red;font-weight: bold'>{{together_goods_info.visit_num}}人</span>愿意和您一起购买，再减<span style='color: red;font-weight: bold'>{{price_filter(together_goods_info.visit_price)}}</span>元。
                    </div>
                    <div class="msg" v-if="together_goods_info.buy_num>0">
                        有<span style='color: red;font-weight: bold'>{{together_goods_info.buy_num}}人</span>和您一起购买了，再减<span style='color: red;font-weight: bold'>{{price_filter(together_goods_info.buy_price)}}</span>元。
                    </div>
                    <div class="line" v-if="together_goods_info.has_huodong"></div>
                    <div class="green" @click="show_share_bar=true;">
                        <img src="img2/huodong.png" style="width: 2rem;"  >
                        "一起买，一起减"活动
                        <img src="img2/you.png" style="height: 1.5rem;margin-top: 0.5rem;float: right;">
                    </div>
                    <div class="msg" v-if="goods_info.is_together">
                        还可以再减，最低能减到<span style='color: red;font-weight: bold'>{{price_filter(goods_info.m_price)}}</span>元。
                    </div>
                    <div class="line"></div>

                </div>

                <div style="width: 100%; padding-bottom: 0rem;" v-for="c in goods.pro_list"  >
                    <div style="display: flex;flex-direction: row;" v-on:click.stop="open_pro_user(c.user_id)">
                        <img :src="c.user__icon_url"
                             style="flex: 0 0 3rem;width: 3rem;height: 3rem;margin: 0.2rem;">
                        <span style="font-size: 1.2rem;color: #4E648F;padding-right: 0.3rem;line-height: 3rem;font-size: 1.4rem;"  >{{c.user__realname}}</span>

                    </div>

                    <span style="font-size: 1.4rem;">{{c.content}}</span>

                    <div class="" v-if="c.file_type==1">
                        <div style="display: flex;flex-direction: row;flex-wrap: wrap;">

                            <img style="margin: 0.1rem;" :src="baseConfig.qn_host + img.fileurl+'?imageView2/1/w/105/h/105'" width="32%" @click="show_big_pengyou_img(c, img.fileurl)" v-if="c.files_json.length>1" v-for="img in c.files_json">
                            <img style="margin: 0.1rem;" :src="baseConfig.qn_host + img.fileurl+'?imageView2/1/w/330/h/330'" width="65%" @click="show_big_pengyou_img(c, img.fileurl)" v-if="c.files_json.length==1" v-for="img in c.files_json">

                        </div>
                    </div>
                    <div class="pengyou_video" v-if="c.file_type==2&&c.video_obj.id" >
                        <video :src="baseConfig.qn_host + c.video_obj.fileurl"   :id="'video'+c.id"
                               style="width:100%;"
                               x-webkit-airplay="true" preload="auto"
                               x5-video-player-type="h5" webkit-playsinline="true"
                               controls
                               playsinline
                               :poster="get_fengmian(c.video_img__fileurl, goods.small_image__fileurl)"
                        >

                        </video>
                    </div>
                    <div style="color: #cccccc;font-size: 1.2rem;">
                        {{c.create_time}}
                    </div>

                </div>

                <div style="margin:auto; width: 100%; display: flex; justify-content: center; font-size: 1.2rem;padding-bottom: 2rem;">
                    <div v-for="v in value_list" style="background-color: #FFDFD1; padding-left: 1rem;padding-right: 1rem;margin-right: 0.5rem; height: 3.5rem; border-radius: 1.5rem; text-align: center;line-height: 3.5rem;">
                        <span v-if="v.value==0">差评</span>
                        <span v-if="v.value==1">凑合</span>
                        <span v-if="v.value==2">一般</span>
                        <span v-if="v.value==3">不错</span>
                        <span v-if="v.value==4">很棒</span>
                        {{v.count}}
                    </div>
                </div>
                <div style="width: 100%; font-size: 1.2rem;color: #9B9B9B;display: flex;flex-direction: row;">
                    <span style="flex:0 1 auto;width: 20rem;">朋友购买数:{{goods.friend_num}}</span>
                    <span style="flex:1 1 auto;"></span>
                    <span style="flex:0 1 auto;width: 20rem;">朋友们评价:
                    <img v-for="img in start_list"
                         :src="img.index<=goods.friend_value+0.5?'img2/star_big_light.png':'img2/star.png'"
                         style="width: 1.2rem;">
                </span>
                </div>
                <div style="width: 100%; display: flex;flex-direction: row;padding-bottom: 1rem;" v-if="goods.buy_user_list.length">
                    <span style="flex: 0 1 auto;width: 7rem;">购买：</span>
                    <div style="flex: 1 1 auto;display: flex; flex-flow: row wrap; align-content: flex-start;">
                        <img :src="u.goods_order__user__icon_url?u.goods_order__user__icon_url:'img2/head.png'" style="width: 4rem;height: 4rem;margin: 0.2rem;" onerror="this.src='img2/head.png'"  v-for="u in goods.buy_user_list" v-on:click.stop="buy_date_ts(u)" >
                    </div>

                </div>

                <div style="width: 100%; padding-bottom: 0rem;" v-for="c in goods.friend_comment_friend_list"  >
                    <span style="font-size: 1.2rem;color: #4E648F;padding-right: 0.3rem;" v-if="!c.to_user_id" v-on:click.stop="ping_lun(goods, c)">{{first_name(c.user__realname)}}：</span>
                    <span style="font-size: 1.2rem;color: #4E648F;padding-right: 0.3rem;" v-if="c.to_user_id" v-on:click.stop="ping_lun(goods, c)">{{first_name(c.user__realname)}}</span>
                    <span style="font-size: 1.2rem;padding-right: 0.3rem;" v-if="c.to_user_id">对</span>
                    <span style="font-size: 1.2rem;color: #4E648F;padding-right: 0.3rem;" v-if="c.to_user_id">{{first_name(c.to_user__realname)}}:</span>
                    <span style="font-size: 1.2rem;">{{c.content}}</span>

                    <span style="font-size: 1.1rem;color: #ff3f38;" v-if="c.user_id==user_id" v-on:click.stop="delete_friend_comment(c)">删除</span>

                </div>

            </div>

            <div style="margin:auto; width: 100%; padding-left: 3rem;padding-bottom:5rem;display: flex; flex-direction: column; font-size: 1.2rem;">
                <div v-for="comment in comment_list" style="display: flex;flex-direction: row;margin-bottom: 0.4rem;">
                    <div style="flex: 0 1 auto;width: 3rem;">
                        <img :src="comment.user__icon_url?comment.user__icon_url:'img2/head.png'"  onerror="this.src='img2/head.png'"  style="border-radius: 2.5rem;width: 3rem;">
                    </div>
                    <div style="flex: 1 1 auto; display: flex;flex-direction: column;">
                        <div style="color: #4E648F;font-size: 1.2rem;">
                            {{first_name(comment.user__realname)}} : {{comment.value+1}}星
                            <span v-if="comment.value==0">差评</span>
                            <span v-if="comment.value==1">凑合</span>
                            <span v-if="comment.value==2">一般</span>
                            <span v-if="comment.value==3">不错</span>
                            <span v-if="comment.value==4">很棒</span>
                        </div>
                        <div style="font-size: 1.2rem;">
                            {{comment.content}}
                        </div>
                        <span style="font-size: 1.1rem;color: #ff3f38;" v-if="comment.user_id==user_id" v-on:click.stop="delete_goods_comment(comment)">删除</span>
                    </div>

                </div>
            </div>

        </div>
    </div>

    <div id="all_pengyou_images" v-if="show_pengyou_dongtai_images">
        <div class="pswp" id="all_pengyou_pswp" tabindex="-1" role="dialog" aria-hidden="true">

            <!-- Background of PhotoSwipe.
                 It's a separate element as animating opacity is faster than rgba(). -->
            <div class="pswp__bg"></div>

            <!-- Slides wrapper with overflow:hidden. -->
            <div class="pswp__scroll-wrap">

                <!-- Container that holds slides.
                    PhotoSwipe keeps only 3 of them in the DOM to save memory.
                    Don't modify these 3 pswp__item elements, data is added later on. -->
                <div class="pswp__container">
                    <div class="pswp__item"></div>
                    <div class="pswp__item"></div>
                    <div class="pswp__item"></div>
                </div>

                <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
                <div class="pswp__ui pswp__ui--hidden">

                    <div class="pswp__top-bar">

                        <!--  Controls are self-explanatory. Order can be changed. -->

                        <div class="pswp__counter"></div>

                        <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>



                        <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                        <!-- element will get class pswp__preloader--active when preloader is running -->
                        <div class="pswp__preloader">
                            <div class="pswp__preloader__icn">
                                <div class="pswp__preloader__cut">
                                    <div class="pswp__preloader__donut"></div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                        <div class="pswp__share-tooltip"></div>
                    </div>

                    <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
                    </button>

                    <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
                    </button>

                    <div class="pswp__caption">
                        <div class="pswp__caption__center"></div>
                    </div>

                </div>

            </div>

        </div>
    </div>
</div>
</body>
</html>